<?php


/** 
 * 图标管理
 * @author Legend. <xcx_legender@qq.com>
 * @param 
 * @return 
 */

namespace Admin\Controller;

class IconController extends BaseManageController {
	/**
	*控制操作的模型表
	*/
	protected $modelName = 'Icon';	

	/**
	*删除类型的设置 true|直接删除， false|设置数据状态
	*/	
	protected $is_del	= false;

	public function _before_index()
	{
		$pack_id = I('pack_id', 0 ,'intval');
		$this->where['pack_id'] = $pack_id;
		$this->getPack($pack_id);
	}

	public function _before_add()
	{
		$pack_id = I('pack_id', 0 ,'intval');
		$this->getPack($pack_id);
	}

	protected function getPack($pack_id)
	{
		if (!$pack_id)
		{
			$this->error('包信息错误');
		}
		$pack = D('Common/IconPacks', 'Service')->find($pack_id);
		$this->pack_id = $pack_id;
		$this->pack = $pack;
	}


}